package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 标的放款状态
 * 
 * @author liaojunjun
 *
 */
@Getter
@AllArgsConstructor
public enum ProjectLendStatusEnum {

	LENDING((byte)1, "放款中"),
	WAITING_BANK_NOTIFY((byte)2, "等待银行通知"),
	ABNORMITY((byte)3, "放款异常"),
    SUCCESS((byte)4, "放款成功"),
    FAIL((byte)5, "放款失败");

	private Byte status;
	private String desc;

	public static ProjectLendStatusEnum enumOf(Byte status) {
		for (ProjectLendStatusEnum lendStatus : values()) {
			if (lendStatus.status.equals(status)) {
				return lendStatus;
			}
		}
		throw new NoSuchEnumValueException("ProjectLendStatusEnum:" + status);
	}
}
